(0) Obligation:

Clauses:

tappend(nil, T, T).
tappend(node(nil, X, T2), T1, node(T1, X, T2)).
tappend(node(T1, X, nil), T2, node(T1, X, T2)).
tappend(node(T1, X, T2), T3, node(U, X, T2)) :- tappend(T1, T3, U).
tappend(node(T1, X, T2), T3, node(T1, X, U)) :- tappend(T2, T3, U).
s2t(s(X), node(T, Y, T)) :- s2t(X, T).
s2t(s(X), node(nil, Y, T)) :- s2t(X, T).
s2t(s(X), node(T, Y, nil)) :- s2t(X, T).
s2t(s(X), node(nil, Y, nil)).
s2t(0, nil).
goal(X) :- ','(s2t(X, T1), tappend(T1, T2, T3)).

Query: goal(g)

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph DT10.

(2) Obligation:

Triples:

s2tA(s(X1), node(X2, X3, X2)) :- s2tA(X1, X2).
s2tA(s(X1), node(nil, X2, X3)) :- s2tA(X1, X3).
s2tA(s(X1), node(X2, X3, nil)) :- s2tA(X1, X2).
tappendB(node(X1, X2, X3), X4, node(X5, X2, X3)) :- tappendB(X1, X4, X5).
tappendB(node(X1, X2, X3), X4, node(X1, X2, X5)) :- tappendB(X3, X4, X5).
goalC(s(X1)) :- s2tA(X1, X2).
goalC(s(X1)) :- ','(s2tcA(X1, X2), tappendB(X2, X3, X4)).
goalC(s(X1)) :- ','(s2tcA(X1, X2), tappendB(X2, X3, X4)).
goalC(s(X1)) :- s2tA(X1, X2).
goalC(s(X1)) :- ','(s2tcA(X1, X2), tappendB(node(nil, X3, X2), X4, X5)).
goalC(s(X1)) :- s2tA(X1, X2).
goalC(s(X1)) :- ','(s2tcA(X1, X2), tappendB(node(X2, X3, nil), X4, X5)).
goalC(s(X1)) :- tappendB(node(nil, X2, nil), X3, X4).

Clauses:

s2tcA(s(X1), node(X2, X3, X2)) :- s2tcA(X1, X2).
s2tcA(s(X1), node(nil, X2, X3)) :- s2tcA(X1, X3).
s2tcA(s(X1), node(X2, X3, nil)) :- s2tcA(X1, X2).
s2tcA(s(X1), node(nil, X2, nil)).
s2tcA(0, nil).
tappendcB(nil, X1, X1).
tappendcB(node(nil, X1, X2), X3, node(X3, X1, X2)).
tappendcB(node(X1, X2, nil), X3, node(X1, X2, X3)).
tappendcB(node(X1, X2, X3), X4, node(X5, X2, X3)) :- tappendcB(X1, X4, X5).
tappendcB(node(X1, X2, X3), X4, node(X1, X2, X5)) :- tappendcB(X3, X4, X5).

Afs:

goalC(x1)  =  goalC(x1)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:
goalC_in: (b)
s2tA_in: (b,f)
s2tcA_in: (b,f)
tappendB_in: (b,f,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

GOALC_IN_G(s(X1)) → U6_G(X1, s2tA_in_ga(X1, X2))
GOALC_IN_G(s(X1)) → S2TA_IN_GA(X1, X2)
S2TA_IN_GA(s(X1), node(X2, X3, X2)) → U1_GA(X1, X2, X3, s2tA_in_ga(X1, X2))
S2TA_IN_GA(s(X1), node(X2, X3, X2)) → S2TA_IN_GA(X1, X2)
S2TA_IN_GA(s(X1), node(nil, X2, X3)) → U2_GA(X1, X2, X3, s2tA_in_ga(X1, X3))
S2TA_IN_GA(s(X1), node(nil, X2, X3)) → S2TA_IN_GA(X1, X3)
S2TA_IN_GA(s(X1), node(X2, X3, nil)) → U3_GA(X1, X2, X3, s2tA_in_ga(X1, X2))
S2TA_IN_GA(s(X1), node(X2, X3, nil)) → S2TA_IN_GA(X1, X2)
GOALC_IN_G(s(X1)) → U7_G(X1, s2tcA_in_ga(X1, X2))
U7_G(X1, s2tcA_out_ga(X1, X2)) → U8_G(X1, tappendB_in_gaa(X2, X3, X4))
U7_G(X1, s2tcA_out_ga(X1, X2)) → TAPPENDB_IN_GAA(X2, X3, X4)
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X5, X2, X3)) → U4_GAA(X1, X2, X3, X4, X5, tappendB_in_gaa(X1, X4, X5))
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X5, X2, X3)) → TAPPENDB_IN_GAA(X1, X4, X5)
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X1, X2, X5)) → U5_GAA(X1, X2, X3, X4, X5, tappendB_in_gaa(X3, X4, X5))
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X1, X2, X5)) → TAPPENDB_IN_GAA(X3, X4, X5)
U7_G(X1, s2tcA_out_ga(X1, X2)) → U9_G(X1, tappendB_in_gaa(node(nil, X3, X2), X4, X5))
U7_G(X1, s2tcA_out_ga(X1, X2)) → TAPPENDB_IN_GAA(node(nil, X3, X2), X4, X5)
U7_G(X1, s2tcA_out_ga(X1, X2)) → U10_G(X1, tappendB_in_gaa(node(X2, X3, nil), X4, X5))
U7_G(X1, s2tcA_out_ga(X1, X2)) → TAPPENDB_IN_GAA(node(X2, X3, nil), X4, X5)
GOALC_IN_G(s(X1)) → U11_G(X1, tappendB_in_gaa(node(nil, X2, nil), X3, X4))
GOALC_IN_G(s(X1)) → TAPPENDB_IN_GAA(node(nil, X2, nil), X3, X4)

The TRS R consists of the following rules:

s2tcA_in_ga(s(X1), node(X2, X3, X2)) → U13_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, X3)) → U14_ga(X1, X2, X3, s2tcA_in_ga(X1, X3))
s2tcA_in_ga(s(X1), node(X2, X3, nil)) → U15_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, nil)) → s2tcA_out_ga(s(X1), node(nil, X2, nil))
s2tcA_in_ga(0, nil) → s2tcA_out_ga(0, nil)
U15_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, nil))
U14_ga(X1, X2, X3, s2tcA_out_ga(X1, X3)) → s2tcA_out_ga(s(X1), node(nil, X2, X3))
U13_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
node(x1, x2, x3)  =  node(x1, x3)
s2tcA_in_ga(x1, x2)  =  s2tcA_in_ga(x1)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
U15_ga(x1, x2, x3, x4)  =  U15_ga(x1, x4)
s2tcA_out_ga(x1, x2)  =  s2tcA_out_ga(x1, x2)
0  =  0
tappendB_in_gaa(x1, x2, x3)  =  tappendB_in_gaa(x1)
nil  =  nil
GOALC_IN_G(x1)  =  GOALC_IN_G(x1)
U6_G(x1, x2)  =  U6_G(x1, x2)
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
U7_G(x1, x2)  =  U7_G(x1, x2)
U8_G(x1, x2)  =  U8_G(x1, x2)
TAPPENDB_IN_GAA(x1, x2, x3)  =  TAPPENDB_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5, x6)  =  U4_GAA(x1, x3, x6)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x1, x3, x6)
U9_G(x1, x2)  =  U9_G(x1, x2)
U10_G(x1, x2)  =  U10_G(x1, x2)
U11_G(x1, x2)  =  U11_G(x1, x2)

We have to consider all (P,R,Pi)-chains

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

GOALC_IN_G(s(X1)) → U6_G(X1, s2tA_in_ga(X1, X2))
GOALC_IN_G(s(X1)) → S2TA_IN_GA(X1, X2)
S2TA_IN_GA(s(X1), node(X2, X3, X2)) → U1_GA(X1, X2, X3, s2tA_in_ga(X1, X2))
S2TA_IN_GA(s(X1), node(X2, X3, X2)) → S2TA_IN_GA(X1, X2)
S2TA_IN_GA(s(X1), node(nil, X2, X3)) → U2_GA(X1, X2, X3, s2tA_in_ga(X1, X3))
S2TA_IN_GA(s(X1), node(nil, X2, X3)) → S2TA_IN_GA(X1, X3)
S2TA_IN_GA(s(X1), node(X2, X3, nil)) → U3_GA(X1, X2, X3, s2tA_in_ga(X1, X2))
S2TA_IN_GA(s(X1), node(X2, X3, nil)) → S2TA_IN_GA(X1, X2)
GOALC_IN_G(s(X1)) → U7_G(X1, s2tcA_in_ga(X1, X2))
U7_G(X1, s2tcA_out_ga(X1, X2)) → U8_G(X1, tappendB_in_gaa(X2, X3, X4))
U7_G(X1, s2tcA_out_ga(X1, X2)) → TAPPENDB_IN_GAA(X2, X3, X4)
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X5, X2, X3)) → U4_GAA(X1, X2, X3, X4, X5, tappendB_in_gaa(X1, X4, X5))
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X5, X2, X3)) → TAPPENDB_IN_GAA(X1, X4, X5)
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X1, X2, X5)) → U5_GAA(X1, X2, X3, X4, X5, tappendB_in_gaa(X3, X4, X5))
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X1, X2, X5)) → TAPPENDB_IN_GAA(X3, X4, X5)
U7_G(X1, s2tcA_out_ga(X1, X2)) → U9_G(X1, tappendB_in_gaa(node(nil, X3, X2), X4, X5))
U7_G(X1, s2tcA_out_ga(X1, X2)) → TAPPENDB_IN_GAA(node(nil, X3, X2), X4, X5)
U7_G(X1, s2tcA_out_ga(X1, X2)) → U10_G(X1, tappendB_in_gaa(node(X2, X3, nil), X4, X5))
U7_G(X1, s2tcA_out_ga(X1, X2)) → TAPPENDB_IN_GAA(node(X2, X3, nil), X4, X5)
GOALC_IN_G(s(X1)) → U11_G(X1, tappendB_in_gaa(node(nil, X2, nil), X3, X4))
GOALC_IN_G(s(X1)) → TAPPENDB_IN_GAA(node(nil, X2, nil), X3, X4)

The TRS R consists of the following rules:

s2tcA_in_ga(s(X1), node(X2, X3, X2)) → U13_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, X3)) → U14_ga(X1, X2, X3, s2tcA_in_ga(X1, X3))
s2tcA_in_ga(s(X1), node(X2, X3, nil)) → U15_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, nil)) → s2tcA_out_ga(s(X1), node(nil, X2, nil))
s2tcA_in_ga(0, nil) → s2tcA_out_ga(0, nil)
U15_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, nil))
U14_ga(X1, X2, X3, s2tcA_out_ga(X1, X3)) → s2tcA_out_ga(s(X1), node(nil, X2, X3))
U13_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
s2tA_in_ga(x1, x2)  =  s2tA_in_ga(x1)
node(x1, x2, x3)  =  node(x1, x3)
s2tcA_in_ga(x1, x2)  =  s2tcA_in_ga(x1)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
U15_ga(x1, x2, x3, x4)  =  U15_ga(x1, x4)
s2tcA_out_ga(x1, x2)  =  s2tcA_out_ga(x1, x2)
0  =  0
tappendB_in_gaa(x1, x2, x3)  =  tappendB_in_gaa(x1)
nil  =  nil
GOALC_IN_G(x1)  =  GOALC_IN_G(x1)
U6_G(x1, x2)  =  U6_G(x1, x2)
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x1, x4)
U7_G(x1, x2)  =  U7_G(x1, x2)
U8_G(x1, x2)  =  U8_G(x1, x2)
TAPPENDB_IN_GAA(x1, x2, x3)  =  TAPPENDB_IN_GAA(x1)
U4_GAA(x1, x2, x3, x4, x5, x6)  =  U4_GAA(x1, x3, x6)
U5_GAA(x1, x2, x3, x4, x5, x6)  =  U5_GAA(x1, x3, x6)
U9_G(x1, x2)  =  U9_G(x1, x2)
U10_G(x1, x2)  =  U10_G(x1, x2)
U11_G(x1, x2)  =  U11_G(x1, x2)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 16 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X1, X2, X5)) → TAPPENDB_IN_GAA(X3, X4, X5)
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X5, X2, X3)) → TAPPENDB_IN_GAA(X1, X4, X5)

The TRS R consists of the following rules:

s2tcA_in_ga(s(X1), node(X2, X3, X2)) → U13_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, X3)) → U14_ga(X1, X2, X3, s2tcA_in_ga(X1, X3))
s2tcA_in_ga(s(X1), node(X2, X3, nil)) → U15_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, nil)) → s2tcA_out_ga(s(X1), node(nil, X2, nil))
s2tcA_in_ga(0, nil) → s2tcA_out_ga(0, nil)
U15_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, nil))
U14_ga(X1, X2, X3, s2tcA_out_ga(X1, X3)) → s2tcA_out_ga(s(X1), node(nil, X2, X3))
U13_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
node(x1, x2, x3)  =  node(x1, x3)
s2tcA_in_ga(x1, x2)  =  s2tcA_in_ga(x1)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
U15_ga(x1, x2, x3, x4)  =  U15_ga(x1, x4)
s2tcA_out_ga(x1, x2)  =  s2tcA_out_ga(x1, x2)
0  =  0
nil  =  nil
TAPPENDB_IN_GAA(x1, x2, x3)  =  TAPPENDB_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X1, X2, X5)) → TAPPENDB_IN_GAA(X3, X4, X5)
TAPPENDB_IN_GAA(node(X1, X2, X3), X4, node(X5, X2, X3)) → TAPPENDB_IN_GAA(X1, X4, X5)

R is empty.
The argument filtering Pi contains the following mapping:
node(x1, x2, x3)  =  node(x1, x3)
TAPPENDB_IN_GAA(x1, x2, x3)  =  TAPPENDB_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

TAPPENDB_IN_GAA(node(X1, X3)) → TAPPENDB_IN_GAA(X3)
TAPPENDB_IN_GAA(node(X1, X3)) → TAPPENDB_IN_GAA(X1)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • TAPPENDB_IN_GAA(node(X1, X3)) → TAPPENDB_IN_GAA(X3)
    The graph contains the following edges 1 > 1

  • TAPPENDB_IN_GAA(node(X1, X3)) → TAPPENDB_IN_GAA(X1)
    The graph contains the following edges 1 > 1

(13) YES

(14) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

S2TA_IN_GA(s(X1), node(nil, X2, X3)) → S2TA_IN_GA(X1, X3)
S2TA_IN_GA(s(X1), node(X2, X3, X2)) → S2TA_IN_GA(X1, X2)
S2TA_IN_GA(s(X1), node(X2, X3, nil)) → S2TA_IN_GA(X1, X2)

The TRS R consists of the following rules:

s2tcA_in_ga(s(X1), node(X2, X3, X2)) → U13_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, X3)) → U14_ga(X1, X2, X3, s2tcA_in_ga(X1, X3))
s2tcA_in_ga(s(X1), node(X2, X3, nil)) → U15_ga(X1, X2, X3, s2tcA_in_ga(X1, X2))
s2tcA_in_ga(s(X1), node(nil, X2, nil)) → s2tcA_out_ga(s(X1), node(nil, X2, nil))
s2tcA_in_ga(0, nil) → s2tcA_out_ga(0, nil)
U15_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, nil))
U14_ga(X1, X2, X3, s2tcA_out_ga(X1, X3)) → s2tcA_out_ga(s(X1), node(nil, X2, X3))
U13_ga(X1, X2, X3, s2tcA_out_ga(X1, X2)) → s2tcA_out_ga(s(X1), node(X2, X3, X2))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
node(x1, x2, x3)  =  node(x1, x3)
s2tcA_in_ga(x1, x2)  =  s2tcA_in_ga(x1)
U13_ga(x1, x2, x3, x4)  =  U13_ga(x1, x4)
U14_ga(x1, x2, x3, x4)  =  U14_ga(x1, x4)
U15_ga(x1, x2, x3, x4)  =  U15_ga(x1, x4)
s2tcA_out_ga(x1, x2)  =  s2tcA_out_ga(x1, x2)
0  =  0
nil  =  nil
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

S2TA_IN_GA(s(X1), node(nil, X2, X3)) → S2TA_IN_GA(X1, X3)
S2TA_IN_GA(s(X1), node(X2, X3, X2)) → S2TA_IN_GA(X1, X2)
S2TA_IN_GA(s(X1), node(X2, X3, nil)) → S2TA_IN_GA(X1, X2)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
node(x1, x2, x3)  =  node(x1, x3)
nil  =  nil
S2TA_IN_GA(x1, x2)  =  S2TA_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(17) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(18) Obligation:

Q DP problem:
The TRS P consists of the following rules:

S2TA_IN_GA(s(X1)) → S2TA_IN_GA(X1)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • S2TA_IN_GA(s(X1)) → S2TA_IN_GA(X1)
    The graph contains the following edges 1 > 1

(20) YES